#pragma once

#include<iostream>
#include<string>
#include<fstream>
class Until
{
public:
static std::string getOneline(std::string& inbuffer,const std::string& sep)
{
    auto pos=inbuffer.find(sep);

    if(pos==std::string::npos)
    {
        return "";
    }

    std::string outbuffer=inbuffer.substr(0,pos);
  //  inbuffer.erase(0,outbuffer.size()+sep.size());
    return outbuffer;
} 

static bool readFile(const std::string& in, char* out,int size)
{
   std:: ifstream tmp(in,std::ios::binary);
    if(!tmp.is_open())
    return false;
    tmp.read(out,size);
    // std::string line;
    // while(std::getline(tmp,line))
    // {
    //     *out+=line;
    // }

    tmp.close();
    return true;
}

};